<?php
 require_once(dirname(__FILE__).'/../database/Week.php');
 require_once(dirname(__FILE__).'/../database/RMHDate.php');
 class testWeek extends UnitTestCase {
 	function testWeekModule() {
      $dates[0] = new RMHDate("03-31-08",null,"","");
      for ($i=1; $i<=6; $i++)
      	  $dates[] = new RMHDate("04-0".$i."-08",null,"","");
      $w=new Week($dates,1,1,1,"unpublished");
    $this->assertEqual($w->get_name(), "March 31, 2008 to April 6, 2008");
	$this->assertTrue($w->get_id()=="03-31-08");
	$this->assertTrue($w->get_status()=="unpublished");
	$this->assertTrue($w->get_end()=="1207540799");
	$dates=$w->get_dates();
	$this->assertTrue($dates[3]->get_id()=="04-03-08");
	$w->set_status("qwerty");
	$this->assertTrue($w->get_status()=="unpublished");
	$w->set_status("archived");
	$this->assertTrue($w->get_status()=="archived");
	$this->assertTrue($w->get_weekday_group()=="1");
	$this->assertTrue($w->get_weekend_group()=="1");

	echo "testWeek complete";
 	  }
 }
?>
